package com.handinglian.ai.system.mapper;
import java.util.Collection;

import com.handinglian.ai.system.dto.UserInfoDto;import com.handinglian.ai.system.entity.Permission;import com.handinglian.ai.system.entity.UserInfo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserInfo record);

    int insertOrUpdate(UserInfo record);

    int insertOrUpdateSelective(UserInfo record);

    int insertSelective(UserInfo record);

    UserInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserInfo record);

    int updateByPrimaryKey(UserInfo record);

    int updateBatch(List<UserInfo> list);

    int batchInsert(@Param("list") List<UserInfo> list);

    UserInfo findInvalidOneByAccount(@Param("account") String account);

    List<UserInfoDto> list(@Param("keyword") String keyword, @Param("loginPermissions") List<Integer> loginPermissions);

    UserInfo findOneByAccount(@Param("account") String account);

    List<Permission> listPermission(@Param("account") String account);

    int updateValidByIdIn(@Param("idCollection")Collection<Integer> idCollection);

    UserInfoDto get(@Param("account")String account);

    int updateLoginPermissionById(@Param("updatedLoginPermission")Integer updatedLoginPermission,@Param("id")Integer id);
}